38b469901d79353c6c1d20fbf7e63fa541e1c6e0,src/edu/stanford/nlp/pipeline/CustomAnnotationSerializer.java,CustomAnnotationSerializer,main,#String[]#,623

Before Change


    if (loadFile != null && ! loadFile.equals("")) {
      CustomAnnotationSerializer ser = new CustomAnnotationSerializer(false, false);
      InputStream is = new FileInputStream(loadFile);
      Annotation anno = ser.load(is);
      System.out.println(anno.toShorterString(new String[0]));
      is.close();
    } else if (file != null && ! file.equals("")) {

After Change


    if (loadFile != null && ! loadFile.equals("")) {
      CustomAnnotationSerializer ser = new CustomAnnotationSerializer(false, false);
      InputStream is = new FileInputStream(loadFile);
      Pair<Annotation, InputStream> pair = ser.read(is);
      pair.second.close();
      Annotation anno = pair.first;
      System.out.println(anno.toShorterString(new String[0]));
      is.close();
    } else if (file != null && ! file.equals("")) {